package com.bdqn;

import com.bdqn.pojo.Equip;
import com.bdqn.pojo.Player;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class PlayerTest {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        Player player = (Player) ctx.getBean("player");
        Equip equip = new Equip();
        equip.setName(player.getRing().getName());
        equip.setType(player.getRing().getType());
        equip.setAttackPlus(player.getRing().getAttackPlus());
        equip.setDefencePlus(player.getRing().getDefencePlus());

        player.updateEquip(equip);
    }
}